<%--
  Created by IntelliJ IDEA.
  User: teacher
  Date: 2023/6/30
  Time: 14:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!--
    通过taglib指令引用对应的tld文件
    uri:引用的tld文件所配置的uri地址
    prefix:引用该文件中方法时的前缀,理论上其值可以随便写,只要多个tld文件所定义的前缀不重复即可
            但是在实际开发中,一般使用对应tld文件的short-name作为前缀
    在调用方法时表达式内容中通过前缀:方法名(参数列表)进行调用
-->
<%@ taglib prefix="ems" uri="/my/ems" %>
<html>
<head>
    <title>修改员工</title>
</head>
<body>
<h1>修改员工信息</h1>
<a href="${pageContext.request.contextPath}/findAll.ems">返回员工列表</a>
<hr>
<form action="${pageContext.request.contextPath}/modify.ems" method="post">
    编号:<input type="text" name="id" value="${emp.id}" readonly><br>
    姓名:<input type="text" name="name" value="${emp.name}"><br>
    工资:<input type="text" name="salary" value="${emp.salary}"><br>
    性别:<input type="radio" name="gender" value="man" ${emp.gender eq "man" ? "checked" : ""}>男
    <input type="radio" name="gender" value="woman" ${emp.gender eq "woman" ? "checked" : ""}>女<br>
    学历:
    <select name="edu">
        <option value="-1">请选择</option>
        <option value="1" ${emp.edu eq "1" ? "selected" : ""}>高中</option>
        <option value="2" ${emp.edu eq "2" ? "selected" : ""}>大专</option>
        <option value="3" ${emp.edu eq "3" ? "selected" : ""}>本科</option>
        <option value="4" ${emp.edu eq "4" ? "selected" : ""}>研究生</option>
    </select><br>
    兴趣:
    <input type="checkbox" name="hobbies" value="eat" ${ems:ch(emp.hob,"eat")}>吃饭
    <input type="checkbox" name="hobbies" value="sleep" ${ems:ch(emp.hob,"sleep")}>睡觉
    <input type="checkbox" name="hobbies" value="beat" ${ems:ch(emp.hob,"beat")}>打豆豆<br>
    <input type="submit" value="修改">
</form>
</body>
</html>